package com.controller;

import com.service.ArticalService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 工具
 * </p>
 *
 * @author zhangqing
 * @since 2021/4/14
 */
@RestController
@RequestMapping("/util")
public class UtilController {
    @Autowired
    private ArticalService articalService;
    /**
     * artical 表 descre,other_pre,other_resource_file where origin = 'jinxiujiaqi'
     * @param oldUrl
     * @param newUrl
     * @return
     */
    @GetMapping("/replaceWordPressUrl")
    @ApiOperation("替换wordpress文章的url")
    public boolean replaceWordPressUrl(String oldUrl,String newUrl){
        return articalService.replaceWordPressUrl(oldUrl,newUrl);
    }
}
